Skip to content

Port model field to CustomAgentConfig from reference implementation#208

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/reference-impl-sync-update-sdk
Draft

Port model field to CustomAgentConfig from reference implementation#208
Copilot wants to merge 5 commits into
mainfrom
copilot/reference-impl-sync-update-sdk

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

Resolves #ISSUE_NUMBER


Before the change?

  • CustomAgentConfig had no way to specify a per-agent model — all agents used the parent session model.

After the change?

  • Adds model field to CustomAgentConfig (ported from d0eb531 in copilot-sdk).
  • When set, the runtime uses this model for the agent, falling back to the parent session model if unavailable.
  • .lastmerge updated to d0eb531e9ff58ea61f406caa9426f498f6485026
  • pom.xml and scripts/codegen/package.json synced to @github/copilot@^1.0.49-1
var agent = new CustomAgentConfig()
    .setName("fast-reviewer")
    .setModel("claude-haiku-4.5")
    .setPrompt("You are a fast code reviewer.");

Not ported (intentionally)

  • Generated RPC/event type changes (38f38ff, 215676e) — require regeneration via update-copilot-dependency.yml
  • reasoningSummary parameter in Session.cs — depends on generated SessionModelSwitchToParams update

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • mvn spotless:apply has been run to format the code
  • mvn clean verify passes locally

Does this introduce a breaking change?

  • Yes
  • No

Copilot AI and others added 2 commits May 16, 2026 16:35
Adds the 'model' property to CustomAgentConfig, allowing per-agent model
selection (e.g. 'claude-haiku-4.5'). When set, the runtime will use this
model for the agent, falling back to the parent session model if unavailable.

Ports d0eb531 from github/copilot-sdk (#1309).

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…om.xml CLI version, and update scripts/codegen @github/copilot version

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot AI changed the title [WIP] Sync reference implementation with new Copilot SDK commits Port model field to CustomAgentConfig from reference implementation May 16, 2026
Copilot AI requested a review from edburns May 16, 2026 16:51
Auto-committed by codegen-check workflow.
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label May 18, 2026
The generated SessionModelSwitchToParams record gained a new
reasoningSummary field, requiring 5 constructor arguments instead of 4.
Updated both call sites in CopilotSession to pass null for the new field.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: 1ecac83

Generated by Codegen Agentic Fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[reference-impl-sync] Reference Implementation sync: 3 new commits (2026-05-16)

2 participants